home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML Browsing & Building Cyberspace
/
VRML - Browsing and Building Cyberspace.iso
/
examples
/
eighth.wrl
< prev
next >
Wrap
Text File
|
1995-06-13
|
2KB
|
73 lines
#VRML V1.0 ascii
# Example eight -create a link from the Sun to an HTML document
# Here comes the Sun
# The Separator node groups everything within it together
Separator {
# The material will effect all subsequent nodes
# The sun is yellow, isn't it? Additive color means red + green = yellow
# We're switching to emissive color because the Sun gives off light.
Material {
emissiveColor 1 1 0 # The Sun emits lots of yellow light
}
# The WWWAnchor node is a group node
# This means that all objects within it are linked with the anchor's URL
# We want to link the Sun, so the Sun's Sphere node goes inside of it.
WWWAnchor {
name "http://www.w3.org/" # The root URL of the World Wide Web
# Inside the anchor, because WWWAnchor is a group node
Sphere {
radius 10 # Big Sun
}
}
# We place the Earth within it's own Separator
# To keep everything good and isolated
Separator {
# Let's move things out of the way here
Transform {
translation 0 20 20
}
# Color the Earth blue, and make it absorb light
# But also make it a reflective, like water
Material {
diffuseColor 0 0 1 # Big blue marble
shininess 0.9 # Water is rather shiny
}
# Finally, create the earth
Sphere {
radius 2 # Little Earth
}
# The Moon gets its own Separator
# Because we really do keep everything separate
Separator {
# The Moon is just outside the Earth
Transform {
translation 4 4 0
}
# Color the Moon grey, make it absorb light
# It's a little shiny, but not much
Material {
diffuseColor 0.7 0.7 0.7
shininess 0.3
}
# And now, create the Moon
Sphere {
radius 1 # Tiny Moon
}
}
}
}